package com.ls.thread.xgCarthroughBridge;

public class car implements Runnable {
	
	//共享资源
	private Linght l;
	
	public car(Linght l) {
		super();
		this.l = l;
	}



	@Override
	public void run() {
		boolean flag=true;
		while(flag){
			flag=l.go();
		}
	}
	
	
	
	
	
	

}
